package com.woniu.woniuYoga.comm.ribbon.config;

import com.netflix.loadbalancer.IRule;
import com.woniu.woniuYoga.comm.ribbon.rules.ClusterWeightRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author: 付宽成
 * @description: RibbonConfig 全局负载均衡器配置
 * @date: 2020/8/8 10:25
 * @version: 1.0
 */

@Configuration
public class RibbonConfig {

    /**
     * @return 自定义负载均衡策略
     */
    @Bean
    public IRule getRule(){
        return new ClusterWeightRule();
    }
}
